package com.kaka.bean;

public class Student {
    private int sid;
    private String username;
    private String password;
    private String name;
    private Integer tid;
    private Double score;
    private int status;

    public Student() {
    }

    public Student(String username, String password, String name) {
        this.username = username;
        this.password = password;
        this.name = name;
    }

    public Student(int sid, String username, String password, String name, Integer tid, Double score, int status) {
        this.sid = sid;
        this.username = username;
        this.password = password;
        this.name = name;
        this.tid = tid;
        this.score = score;
        this.status = status;
    }

    public int getSid() {
        return sid;
    }

    public void setSid(int sid) {
        this.sid = sid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getTid() {
        return tid;
    }

    public void setTid(Integer tid) {
        this.tid = tid;
    }

    public Double getScore() {
        return score;
    }

    public void setScore(Double score) {
        this.score = score;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Override
    public String toString() {
        if (score == null){
            return "学号：" + sid + ", 姓名：'" + name + ", 成绩：未参加考试";
        }
        return "学号：" + sid + ", 姓名：'" + name + ", 成绩：" + score;
    }
}
